Skip to content

fix(seo): restore the homepage OpenGraph image - #12593

Merged
mergify[bot] merged 1 commit into
mainfrom
devs/jd/agentic-readiness/restore-homepage-opengraph-image--fb9a23ea
Sep 1, 2026
Merged

fix(seo): restore the homepage OpenGraph image#12593
mergify[bot] merged 1 commit into
mainfrom
devs/jd/agentic-readiness/restore-homepage-opengraph-image--fb9a23ea

Conversation

@jd

@jd jd commented Aug 28, 2026

Copy link
Copy Markdown
Member

getOgImageUrl strips the leading and trailing slashes off the pathname to
build the image filename. For the homepage that pathname is /, so stripping
left an empty string and the lookup missed — every docs page had an OpenGraph
image and the homepage shipped <meta property="og:image"> with no content.

The homepage's collection id is index, which is what getStaticPaths names
its image, so fall back to that when the slug comes out empty.

Covered by a regression test that fails against the old expression. The
generated-image set comes from the content collection and needs the Astro build
pipeline, so the test stubs it and exercises the derivation, which is the half
that was wrong.

Copilot AI lite review requested due to automatic review settings August 28, 2026 13:26
@mergify
mergify Bot had a problem deploying to Mergify Merge Protections August 28, 2026 13:26 Failure
@jd

jd commented Aug 28, 2026

Copy link
Copy Markdown
Member Author

This pull request is part of a Mergify stack:

# Pull Request Link
1 fix(seo): restore the homepage OpenGraph image #12593 👈
2 fix(a11y): stop docset grids skipping a heading level #12594
3 feat(docs): publish the API description where machines look for it #12595
4 feat(docs): serve Markdown to clients that ask for it #12596
5 feat(docs): tell agents what Mergify is for in llms.txt #12597
6 feat(seo): describe the site with schema.org JSON-LD #12598
7 feat(docs): point a lost agent somewhere useful from the 404 #12599

@mergify

mergify Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Merge Protections

🟢 All 6 merge protections satisfied — ready to merge.

Show 6 satisfied protections

🟢 🤖 Continuous Integration

  • all of:
    • check-success = build
    • check-success = lint
    • check-success = test
    • any of:
      • check-success = test-broken-links
      • label = ignore-broken-links
    • any of:
      • check-success=Cloudflare Pages
      • -head-repo-full-name~=^Mergifyio/

🟢 👀 Review Requirements

  • any of:
    • #approved-reviews-by >= 2
    • author = dependabot[bot]
    • author = renovate[bot]
    • all of:
      • author = mergify-ci-bot
      • -head ~= ^docs-agent/

🟢 Enforce conventional commit

Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/

  • title ~= ^(fix|feat|internal|docs|style|refactor|perf|test|build|ci|chore|revert|ui)(?:\(.+\))?!?:

🟢 🔎 Reviews

  • #changes-requested-reviews-by = 0
  • #review-requested = 0
  • #review-threads-unresolved = 0

🟢 📕 PR description

  • body ~= (?ms:.{48,})

🟢 🚦 Auto-queue

When all merge protections are satisfied, this pull request will be queued automatically.

@mergify
mergify Bot requested a review from a team August 28, 2026 13:28

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes missing OpenGraph metadata on the docs homepage by ensuring the OG image lookup resolves correctly when the pathname is /.

Changes:

  • Add a homepage-specific fallback so an empty slug resolves to the index OpenGraph image.
  • Refactor the OG image filename construction to use a slug variable for clarity.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/util/getOgImageUrl.ts
@jd
jd marked this pull request as ready for review August 28, 2026 14:04
@jd
jd force-pushed the devs/jd/agentic-readiness/restore-homepage-opengraph-image--fb9a23ea branch from eb3dabd to a98ca32 Compare August 28, 2026 14:37
@jd

jd commented Aug 28, 2026

Copy link
Copy Markdown
Member Author

Revision history

# Type Changes Reason Date
1 initial eb3dabd 2026-08-28 14:37 UTC
2 content eb3dabd → a98ca32 Add the regression test copilot asked for on #12593 2026-08-28 14:37 UTC
3 rebase a98ca32 → b9a20ed (rebase only) 2026-08-28 15:09 UTC

@mergify
mergify Bot had a problem deploying to Mergify Merge Protections August 28, 2026 14:37 Failure
@jd
jd force-pushed the devs/jd/agentic-readiness/restore-homepage-opengraph-image--fb9a23ea branch from a98ca32 to b9a20ed Compare August 28, 2026 15:09
@mergify
mergify Bot requested a deployment to Mergify Merge Protections August 28, 2026 15:10 In progress
@jd
jd requested a review from a team August 31, 2026 11:04
@jd jd closed this Sep 1, 2026
@jd jd reopened this Sep 1, 2026
@jd

jd commented Sep 1, 2026

Copy link
Copy Markdown
Member Author

@Mergifyio rebase

`getOgImageUrl` strips the leading and trailing slashes off the pathname to
build the image filename. For the homepage that pathname is `/`, so stripping
left an empty string and the lookup missed — every docs page had an OpenGraph
image and the homepage shipped `<meta property="og:image">` with no content.

The homepage's collection id is `index`, which is what `getStaticPaths` names
its image, so fall back to that when the slug comes out empty.

Covered by a regression test that fails against the old expression. The
generated-image set comes from the content collection and needs the Astro build
pipeline, so the test stubs it and exercises the derivation, which is the half
that was wrong.

Change-Id: Ifb9a23ea2caa20d28489a4f21363d85ed5e3342c
@mergify

mergify Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

rebase

✅ Branch has been successfully rebased

@jd
jd force-pushed the devs/jd/agentic-readiness/restore-homepage-opengraph-image--fb9a23ea branch from b9a20ed to d71a6ef Compare September 1, 2026 08:50
@mergify
mergify Bot deployed to Mergify Merge Protections September 1, 2026 08:50 Active
@mergify

mergify Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Merge Queue Status

This pull request spent 3 minutes 5 seconds in the queue, including 2 minutes 24 seconds running CI.

Required conditions to merge

@mergify mergify Bot added the queued label Sep 1, 2026
@mergify
mergify Bot merged commit 4856f90 into main Sep 1, 2026
10 checks passed
@mergify
mergify Bot deleted the devs/jd/agentic-readiness/restore-homepage-opengraph-image--fb9a23ea branch September 1, 2026 08:55
@mergify mergify Bot removed the queued label Sep 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants